﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Configuration;
using System.Web.Mvc;
namespace RBAC.Web.Models
{
	public class FunctionModel
	{	
			    
					 //Autokey NOT PK
						[DisplayName("Id")]
						public int Id { get; set; }
									 
					 //Pk NOT Autokey
						[Required]
						[StringLength(255, ErrorMessage = "FuncName cannot be longer than 255 characters.")]
						[Remote("doesFuncNameExist", "Function", HttpMethod = "POST", AdditionalFields = "Mode, OldValue", ErrorMessage = "Func Name already exists. Please enter a different Func Name")]
						[DisplayName("Func Name")]
						public String FuncName { get; set; }
									 
					 
						[Required]
						[StringLength(255, ErrorMessage = "Description cannot be longer than 255 characters.")]
						[DisplayName("Description")]
						public String Description { get; set; }
									 
																		[DisplayName("Domain")]
							public int Domain { get; set; }
																								public int DomainId { get; set; }
																																public String DomainDomainName { get; set; }
																								 
					  
						[Required(ErrorMessage="Please select FunctionStatus")]
						[DisplayName("Status")]
						public int FunctionStatus { get; set; }

														 
					  
						[Required(ErrorMessage="Please select FunctionName")]
						[DisplayName("Function Name")]
						public int FunctionName { get; set; }

														 
																		[DisplayName("Role")]
							public int DomainLookup { get; set; }
																								public int DomainLookupId { get; set; }
																																public String DomainLookupDomainName { get; set; }
																								
				// For PopLookup
				public List<FunctionModel> ListOfFunction { get; set; }
				public string[] RequiredFields { get; set; }
	}
}